package com.sap.sap_mangers.dto.share;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import java.sql.Timestamp;

/**
 * 修改资料 记录类
 *
 * @author ZhouKai
 * 2022/9/13 19:08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ModifyFile {
    /**
     * 用于在插入数据后获取这个记录的ID
     */
    private Integer shareId;
    private String username;
    private String name;
    private Timestamp createTime;
    private String topic;
    private MultipartFile file;
    private String fileUrl;
    private String url;
    private Integer type;
    private Integer fileType;
    private String tip;
    /**
     * 对应的旧版本的分享资料(ID)
     */
    private Integer oldShareVersion;

    public ModifyFile(String topic, MultipartFile file, String url, Integer type, Integer fileType, Integer oldShareVersion) {
        this.topic = topic;
        this.file = file;
        this.url = url;
        this.type = type;
        this.fileType = fileType;
        this.oldShareVersion = oldShareVersion;
    }
}
